def lower_upper(x):
    lst = []
    for item in x:
        if 'A' <= item <= 'Z':
            lst.append(chr(ord(item) + 32))
        elif 'a' <= item <= 'z':
            lst.append(chr(ord(item) - 32))
        else:
            lst.append(item)

    return ''.join(lst)


s = input('please input string:')
new_s = lower_upper(s)
print(new_s)
